<?php
namespace app\api\controller;
use app\api\service\MinerVideo as ServiceMinerVideo;
use app\facade\Basic;
use think\Request;

class MinerVideo extends BaseController
{

    /**
     *  视频列表
     */
    public function list(Request $request)
    {
        $param['page'] = $request->param('page',1);
        $param['pageSize'] = $request->param('pageSize',15);
        $param['id'] = $request->param('id',null);
        $param['category'] = $request->param('category',null);
        $param['sort'] = $request->param('sort',1);

        /* 验证 */
        $this->validateData($param,'MinerVideo.list');

        /* 登录操作 */
        $ServiceMinerVideo = new ServiceMinerVideo();
        $result = $ServiceMinerVideo->videoList($param);
        return Basic::json($result);
    }

    /**
     *  管理员登录
     */
    public function detail(Request $request)
    {
        $param['id'] = $request->param('id',1);

        /* 验证 */
        $this->validateData($param,'MinerVideo.detail');

        /* 登录操作 */
        $ServiceMinerVideo = new ServiceMinerVideo();
        $result = $ServiceMinerVideo->detail($param);
        return Basic::json($result);
    }


}
